package com.xieke.admin.entity;

import com.baomidou.mybatisplus.annotation.*;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import lombok.ToString;

import java.util.Date;

/**
 * <p>
 * 系统权限表
 * </p>
 *
 * @author Auto Generator
 * @since 2018-07-16
 */
@Data
@ToString
@TableName("sys_permission" )
public class Permission extends Model<Permission> {

    private static final long serialVersionUID = 1L;

    /**
     * 主键ID
     */
    @TableId(value = "id" , type = IdType.AUTO)
    private Integer id;
    /**
     * 是否可用
     */
    private Integer available;
    /**
     * 权限名称
     */
    @TableField("permission_name" )
    private String permissionName;
    /**
     * 父权限ID
     */
    @TableField("parent_id" )
    private Integer parentId;
    /**
     * 父权限ID列表
     */
    @TableField("parent_ids" )
    private String parentIds;
    /**
     * 权限编码
     */
    @TableField("permission_code" )
    private String permissionCode;
    /**
     * 资源类型(menu/button)
     */
    @TableField("resource_type" )
    private String resourceType;
    /**
     * 资源路径
     */
    private String url;
    /**
     * 修改时间
     */
    @TableField(value = "update_time" , fill = FieldFill.INSERT_UPDATE)
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss" , timezone = "GMT+8" )
    private Date updateTime;
    /**
     * 创建时间
     */
    @TableField(value = "create_time" , fill = FieldFill.INSERT)
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss" , timezone = "GMT+8" )
    private Date createTime;

}
